package cn.iocoder.yudao.module.famous.doctor.dal.mysql.dividegroups;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.famous.doctor.dal.dataobject.dividegroups.DividegroupsDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.famous.doctor.controller.admin.dividegroups.vo.*;

/**
 * 我的分组 Mapper
 *
 * @author 启航
 */
@Mapper
public interface DividegroupsMapper extends BaseMapperX<DividegroupsDO> {

    default PageResult<DividegroupsDO> selectPage(DividegroupsPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<DividegroupsDO>()
                .likeIfPresent(DividegroupsDO::getName, reqVO.getName())
                .betweenIfPresent(DividegroupsDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(DividegroupsDO::getId));
    }

    default List<DividegroupsDO> selectList(DividegroupsExportReqVO reqVO) {
        return selectList(new LambdaQueryWrapperX<DividegroupsDO>()
                .likeIfPresent(DividegroupsDO::getName, reqVO.getName())
                .betweenIfPresent(DividegroupsDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(DividegroupsDO::getId));
    }

}
